Optimal. Leaf size=90 \[ -\frac {a^4 A}{2 x^2}-\frac {a^3 (a B+4 A b)}{x}+2 a^2 b \log (x) (2 a B+3 A b)+\frac {1}{2} b^3 x^2 (4 a B+A b)+2 a b^2 x (3 a B+2 A b)+\frac {1}{3} b^4 B x^3 \]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {27, 76} \begin {gather*} -\frac {a^3 (a B+4 A b)}{x}+2 a^2 b \log (x) (2 a B+3 A b)-\frac {a^4 A}{2 x^2}+\frac {1}{2} b^3 x^2 (4 a B+A b)+2 a b^2 x (3 a B+2 A b)+\frac {1}{3} b^4 B x^3 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 76
Rubi steps
\begin {align*} \int \frac {(A+B x) \left (a^2+2 a b x+b^2 x^2\right )^2}{x^3} \, dx &=\int \frac {(a+b x)^4 (A+B x)}{x^3} \, dx\\ &=\int \left (2 a b^2 (2 A b+3 a B)+\frac {a^4 A}{x^3}+\frac {a^3 (4 A b+a B)}{x^2}+\frac {2 a^2 b (3 A b+2 a B)}{x}+b^3 (A b+4 a B) x+b^4 B x^2\right ) \, dx\\ &=-\frac {a^4 A}{2 x^2}-\frac {a^3 (4 A b+a B)}{x}+2 a b^2 (2 A b+3 a B) x+\frac {1}{2} b^3 (A b+4 a B) x^2+\frac {1}{3} b^4 B x^3+2 a^2 b (3 A b+2 a B) \log (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 86, normalized size = 0.96 \begin {gather*} -\frac {a^4 (A+2 B x)}{2 x^2}-\frac {4 a^3 A b}{x}+2 a^2 b \log (x) (2 a B+3 A b)+6 a^2 b^2 B x+2 a b^3 x (2 A+B x)+\frac {1}{6} b^4 x^2 (3 A+2 B x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(A+B x) \left (a^2+2 a b x+b^2 x^2\right )^2}{x^3} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.40, size = 101, normalized size = 1.12 \begin {gather*} \frac {2 \, B b^{4} x^{5} - 3 \, A a^{4} + 3 \, {\left (4 \, B a b^{3} + A b^{4}\right )} x^{4} + 12 \, {\left (3 \, B a^{2} b^{2} + 2 \, A a b^{3}\right )} x^{3} + 12 \, {\left (2 \, B a^{3} b + 3 \, A a^{2} b^{2}\right )} x^{2} \log \relax (x) - 6 \, {\left (B a^{4} + 4 \, A a^{3} b\right )} x}{6 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.15, size = 96, normalized size = 1.07 \begin {gather*} \frac {1}{3} \, B b^{4} x^{3} + 2 \, B a b^{3} x^{2} + \frac {1}{2} \, A b^{4} x^{2} + 6 \, B a^{2} b^{2} x + 4 \, A a b^{3} x + 2 \, {\left (2 \, B a^{3} b + 3 \, A a^{2} b^{2}\right )} \log \left ({\left | x \right |}\right ) - \frac {A a^{4} + 2 \, {\left (B a^{4} + 4 \, A a^{3} b\right )} x}{2 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 96, normalized size = 1.07 \begin {gather*} \frac {B \,b^{4} x^{3}}{3}+\frac {A \,b^{4} x^{2}}{2}+2 B a \,b^{3} x^{2}+6 A \,a^{2} b^{2} \ln \relax (x )+4 A a \,b^{3} x +4 B \,a^{3} b \ln \relax (x )+6 B \,a^{2} b^{2} x -\frac {4 A \,a^{3} b}{x}-\frac {B \,a^{4}}{x}-\frac {A \,a^{4}}{2 x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.55, size = 96, normalized size = 1.07 \begin {gather*} \frac {1}{3} \, B b^{4} x^{3} + \frac {1}{2} \, {\left (4 \, B a b^{3} + A b^{4}\right )} x^{2} + 2 \, {\left (3 \, B a^{2} b^{2} + 2 \, A a b^{3}\right )} x + 2 \, {\left (2 \, B a^{3} b + 3 \, A a^{2} b^{2}\right )} \log \relax (x) - \frac {A a^{4} + 2 \, {\left (B a^{4} + 4 \, A a^{3} b\right )} x}{2 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.07, size = 91, normalized size = 1.01 \begin {gather*} \ln \relax (x)\,\left (4\,B\,a^3\,b+6\,A\,a^2\,b^2\right )-\frac {x\,\left (B\,a^4+4\,A\,b\,a^3\right )+\frac {A\,a^4}{2}}{x^2}+x^2\,\left (\frac {A\,b^4}{2}+2\,B\,a\,b^3\right )+\frac {B\,b^4\,x^3}{3}+2\,a\,b^2\,x\,\left (2\,A\,b+3\,B\,a\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.42, size = 97, normalized size = 1.08 \begin {gather*} \frac {B b^{4} x^{3}}{3} + 2 a^{2} b \left (3 A b + 2 B a\right ) \log {\relax (x )} + x^{2} \left (\frac {A b^{4}}{2} + 2 B a b^{3}\right ) + x \left (4 A a b^{3} + 6 B a^{2} b^{2}\right ) + \frac {- A a^{4} + x \left (- 8 A a^{3} b - 2 B a^{4}\right )}{2 x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________